package com.ey12.service;

import java.util.List;

import com.ey12.db.dao.GmComplainDAO;
import com.ey12.db.domain.GmComplain;

public class GmComplainService {
	private GmComplainDAO gmComplainDAO;
	public void setGmComplainDAO(GmComplainDAO gmComplainDAO) {
		this.gmComplainDAO = gmComplainDAO;
	}
	public GmComplainDAO getGmComplainDAO() {
		return gmComplainDAO;
	}
	public List getAll(){
		return gmComplainDAO.findAll();
	}
	public void delComplain(GmComplain g){
//		System.out.println("-");
		gmComplainDAO.delete(g);
	}
	public void addComplain(String username,String email,String mobile,String qqnum,String msn,String remark) {
		GmComplain cp = new GmComplain();
		cp.setEmail(email);
		cp.setMobile(mobile);
		cp.setMsn(msn);
		cp.setQqnum(qqnum);
		cp.setUsername(username);
		cp.setRemark(remark);
		gmComplainDAO.saveOrUpdate(cp);
	}


	
}
